package br.com.mtg.movethegarbage.framework;

import java.util.ArrayList;

import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.View.OnKeyListener;

public abstract class Input implements OnKeyListener, OnTouchListener
{
	protected ArrayList<GameKeyEvent> keyEvents = new ArrayList<GameKeyEvent>();
	protected ArrayList<GameTouchEvent> touchEvents = new ArrayList<GameTouchEvent>();
	protected boolean backPressed = false;
	protected boolean hardKeyboardHidden = false;
	protected boolean[] pressedKeys = new boolean[128];

	public abstract boolean onTouch(View view, MotionEvent e);

	public abstract boolean onKey(View view, int keyCode, KeyEvent e);

	public abstract ArrayList<GameKeyEvent> getKeyEvents();

	public abstract ArrayList<GameTouchEvent> getTouchEvents();

	public abstract void onBackPressed();

	public abstract boolean wasBackPressed();

	public abstract boolean[] getPressedKeys();

	public abstract boolean isKeyPressed(int keyCode);

	public abstract void showKeyboard(Game game);

	public abstract void hideKeyboard(Game game);
}
